export const table_config = () => {
    const config = {
        pageSize: 10,
        pageNum: 1,
        total: 1000,
        rowKey: "deptId", //如果需要树型数据填写这个，否则为空
        // defaultColumnWidth: 210,//默认的列宽

        //UI
        defaultExpandAll: true, //是否默认展开所有行
        pagingShow: false,//本页1-2
        totalShow: true,//共10条数据
        paginationShow: false,//分页

        searchList: [
            {placeholder: '请输入部门名称', label: '部门名称', key: 'deptName', type: 'text'},
            // {
            //     placeholder: '部门状态',
            //     label: '状态',
            //     key: 'status',
            //     type: 'select',
            //     source: "dict", //source: dict字典查询/select 数据来源方向
            //     dict: "sys_normal_disable",
            //     select: [{label: "正常", value: "1"}, {label: "停用", value: "0"}]
            // },
        ],
        buttonList: [
            {name: '刷新数据', type: 'primary', plain: true, emitLabel: 'refresh'},
            {name: '展开折叠', type: 'info', emitLabel: 'expand'},
            {name: '新增部门', type: 'primary', emitLabel: 'add'},
        ],
        tableList: [
            {label: '部门名称', key: 'deptName', link: true,width:500},
            {label: '职务人员数量', key: 'count'},
            {label: '职务数量', key: 'count'},
            {label: '排序', key: 'orderNum'},
            // {label: '负责人', key: 'leader'},
            // {label: '电话', key: 'phone'},
            // {label: '电子邮件', key: 'email'},
            {label: '创建时间', key: 'createTime'},
            {label: '状态', key: 'status', dicKey: "sys_normal_disable"},
        ],
        tableButton: {
            name: '操作',
            list: [
                {name: '修改', type: 'success', emitLabel: 'edit', childrenDisplay: false, power:"system:dept:edit"},
                {name: '新增', type: 'primary', emitLabel: 'addChildren', childrenDisplay: false, power:"system:dept:add"},
                {name: '删除', type: 'danger', emitLabel: 'delete', childrenDisplay: true, power:"system:dept:remove"}
            ]
        }
    }
    return config
}